<template>
    <div class="chart-title">
        <i>»</i>
        <span>{{ props.title }}</span>
    </div>
</template>

<script setup lang="ts">
const props = defineProps({
    title: {
        type: String, //参数类型
        default: '标题', //默认值
        required: true //是否必须传递
    }
})
</script>

<style lang="scss" scoped>
.chart-title {
    margin-top: 10px;
    display: flex;
    align-items: center;
    height: 2rem;
    padding-left: 0.5rem;

    >i {
        color: #ed4b42;
        margin-right: 0.5rem;
    }

    >span {
        flex: 1;
        line-height: 2rem;
        font-size: 1rem;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        color:white;
    }
}
</style>